package Example;
class  Animal4{
    //定义动物叫的方法
    public void  shout(){
        System.out.println("动物发出叫声");
    }
}
//定义Dog类继承Animal类
class Dog4 extends Animal{
    private void shout(){
        System.out.println("汪汪汪……");
    }
}
public class si4 {
    public static void main(String[] args) {
        Dog4 dog4 = new Dog4();
        Dog3 dog;
    }
}
